<template>
  <div class="agent frame_content m10" style="margin-bottom: 40px">
    <table class="common cent agentTable">
        <thead>
            <tr>
                <th>账号</th>
                <th>代理深度</th>
                <th>在线人数</th>
                <th>总流水</th>
                <th>总余额</th>
                <th>到期时间</th>
                <th>彩种</th>
                <th>操作</th>
            </tr>
      </thead>
      <tbody>
        <tr v-for="(list,index) in lists" :key="index">
            <th>{{list.account_id}}</th>
            <th>{{list.agent_level}}</th>
            <th>{{list.num}}</th>
            <th>{{list.money}}</th>
            <th>{{list.balance}}</th>
            <th>{{list.create_time}}</th>
            <th>{{list.lottery}}</th>
            <th>
              <!--<router-link :to="{path: `/index/monitor/${list.account_id}`}">查看房间数据</router-link>-->
              <!-- <router-link :to="{ name: 'monitor', params: { id: list.account_id }}">查看房间数据</router-link> -->
            </th>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
import http from "@/utils/http";
export default {
  data() {
    return {
      lists:[],
      lottery:[]

    };
  },

  methods: {
    room_lists(){
        let token=sessionStorage.getItem('token');
        let page=1;
        http.post(
            `/api/login/agent/agent_details?token=${token}&page=${page}`
        )
        .then(response => {
            console.log(response,'369');
            this.lists=response.data.list;
            this.lottery=response.data.list.lottery;


        });
    }
  },
  created() {
      this.room_lists();
  }
};
</script>

<style>
.el-input{
  left: 10px !important;
}
.el-input__inner{
 height:25px !important;
 width: 180px !important;
}
.el-input__icon{
  position: relative;
  bottom: 7px;
}
table tbody tr:nth-child(even) {
  background: #f2f2f2;
}
.agent a {
  color: #08c;
  text-decoration: none;
}
.agent a:hover,
a:focus {
  color: #005580;
  text-decoration: underline;
}
.agentTable img {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto;
}
.layerModel .wrap {
  box-sizing: border-box;
  height: 100%;
  border-top: none;
  overflow-y: auto;
  padding: 10px;
}
#model1 .sendBtn,
#model3 .cancelBtn {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 20px;
  color: #333;
  text-align: center;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  vertical-align: middle;
  cursor: pointer;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
}
#model1 .sendBtn:hover,
#model3 .cancelBtn:hover {
  text-decoration: none;
}
a:hover,
a:active {
  outline: 0;
}
#model2 .addBtn {
  width: 40px;
  height: 22px;
  border: 1px solid #9b9b9b;
  background-color: #e1e1e1;
  text-align: center;
  line-height: 22px;
  color: #333;
  display: inline-block;
  margin: 0 10px;
  text-decoration: none;
  vertical-align: super;
}
#model2 .cancelBtn {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 20px;
  color: #333;
  text-align: center;
  background-color: #f5f5f5;
}
#model2 a {
  text-decoration: none;
}
</style>
